package com.lzkj.raos.text;

import com.lzkj.raos.entity.AccessToken;
import com.lzkj.raos.utils.WeixinUtil;

/**
 * @author RaoShuang
 * @emil 991207823@qq.com
 * @date 2021/3/23 23:54
 * 微信测试
 */
public class WeixinTest {

    public static void main(String[] args) {
        try {
            AccessToken token = WeixinUtil.getAccessToken();
            System.out.println("票据=" + token.getToken());
            System.out.println("有效时间=" + token.getExpiresIn());

            //String path = "D:/imooc.jpg";
            //String mediaId = WeixinUtil.upload(path, token.getToken(), "thumb");
            //System.out.println(mediaId);

//            String result = WeixinUtil.translate("my name is laobi");
//            //String result = WeixinUtil.translateFull("");
//            System.out.println(result);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}
